import request from '@/axios'

export const GetCourseTypesApi = (params) => {
  return request.get({ url: '/api/CourseType/GetCourseTypes', params })
}
export const AddCourseTypeApi = (data) => {
  return request.post({ url: '/api/CourseType/AddCourseType', data })
}
export const DeleteCourseTypesApi = (data) => {
  return request.post({ url: '/api/CourseType/DeleteCourseTypes', data })
}
export const DownloadCourseTemplateApi = () => {
  return request.post({ url: '/api/Course/DownloadCourseTemplate', responseType: 'blob' })
}
export const DownloadScoreCriteriaTemplateApi = () => {
  return request.post({
    url: '/api/ScoreCriteria/DownloadScoreCriteriaTemplate',
    responseType: 'blob'
  })
}
export const GetUndoneCoursesApi = () => {
  return request.get({ url: '/api/Course/GetUndoneCourses' })
}
//GetAllCoursesApi
export const GetAllCoursesApi = () => {
  return request.get({ url: '/api/Course/GetAllCourses' })
}
export const UpdateCourseTypeApi = (data) => {
  return request.post({ url: '/api/CourseType/UpdateCourseType', data })
}

export const AddCourseApi = (data) => {
  return request.post({ url: '/api/Course/AddCourse', data })
}

export const DeleteCoursesApi = (data) => {
  return request.post({ url: '/api/Course/DeleteCourses', data })
}

export const GetCoursesApi = (data) => {
  return request.post({ url: '/api/Course/GetCourses', data })
}

export const UpdateCourseApi = (data) => {
  return request.post({ url: '/api/Course/UpdateCourse', data })
}

export const AddCoursePlanApi = (data) => {
  return request.post({ url: '/api/CoursePlan/AddCoursePlan', data })
}

export const DeleteCoursesPlanApi = (data) => {
  return request.post({ url: '/api/CoursePlan/DeleteCoursePlans', data })
}

export const GetCoursePlansApi = (data) => {
  return request.post({ url: '/api/CoursePlan/GetCoursePlans', data })
}

export const UpdateCoursePlanApi = (data) => {
  return request.post({ url: '/api/CoursePlan/UpdateCourse', data })
}

export const DeletePlanExamsApi = (data) => {
  return request.post({ url: '/api/planExam/DeletePlanExams', data })
}
export const GetPlanExamResultsApi = (params) => {
  return request.get({ url: '/api/planExam/GetPlanExamResults', params })
}
export const GetPlanExamsApi = (data) => {
  return request.post({ url: '/api/planExam/GetPlanExams', data })
}
/**
 * 查询已完成课程信息
 * @returns
 */
export const GetDoneCoursePlansApi = () => {
  return request.get({ url: '/api/Evaluation/GetDoneCoursePlans' })
}

export const GetDoneCourseExamsApi = () => {
  return request.get({ url: '/api/Evaluation/GetDoneCourseExams' })
}
/**
 * 查询课程评价信息
 * @param data
 * @returns
 */
export const GetPlanEvaluationsApi = (data) => {
  return request.post({ url: '/api/Evaluation/GetPlanEvaluations', data })
}
export const GetExamEvaluationsApi = (data) => {
  return request.post({ url: '/api/Evaluation/GetExamEvaluations', data })
}

export const GetMyExamEvaluationsApi = (data) => {
  return request.post({ url: '/api/Evaluation/GetMyExamEvaluations', data })
}
export const AddCourseEvaluationApi = (data) => {
  return request.post({ url: '/api/Evaluation/AddCourseEvaluation', data })
}

export const DeleteCourseEvaluationsApi = (data) => {
  return request.post({ url: '/api/Evaluation/DeleteCourseEvaluations', data })
}
export const GetMyPlanEvaluationsApi = (data) => {
  return request.post({ url: '/api/Evaluation/GetMyPlanEvaluations', data })
}

export const GetCourseLabelsApi = (params) => {
  return request.get({ url: '/api/CourseLabel/GetCourseLabels', params })
}
export const AddCourseLabelApi = (data) => {
  return request.post({ url: '/api/CourseLabel/AddCourseLabel', data })
}
export const DeleteCourseLabelsApi = (data) => {
  return request.post({ url: '/api/CourseLabel/DeleteCourseLabels', data })
}
export const UpdateCourseLabelApi = (data) => {
  return request.post({ url: '/api/CourseLabel/UpdateCourseLabel', data })
}
/**
 * 老师授课分析表
 * @param data
 * @returns
 */
export const GetTeacherCoursesApi = (data) => {
  return request.post({ url: '/api/Course/GetTeacherCourses', data })
}

/**
 * 考试情况表
 * @param data
 * @returns
 */
export const GetExamsApi = (data) => {
  return request.post({ url: '/api/planExam/GetExams', data })
}

/**
 * 课程培训情况表
 * @param data
 * @returns
 */
export const GetPlansApi = (data) => {
  return request.post({ url: '/api/CoursePlan/GetPlans', data })
}
/**
 * 课程分析 按老师统计
 * @param data
 * @returns
 */
export const GetCourseTeacherApi = (data) => {
  return request.post({ url: '/api/Course/GetCourseTeacher', data })
}

/**
 * 课程分析 按学员统计
 * @param data
 * @returns
 */
export const GetCourseUserApi = (data) => {
  return request.post({ url: '/api/Course/GetCourseUser', data })
}
/**
 * 课程分析 按课程统计
 * @param data
 * @returns
 */
export const GetCourseCourseApi = (data) => {
  return request.post({ url: '/api/Course/GetCourseCourse', data })
}

/**
 * 添加评分规则信息
 * @param data
 * @returns
 */
export const AddScoreCriteriaApi = (data) => {
  return request.post({ url: '/api/ScoreCriteria/AddScoreCriteria', data })
}
export const DeleteScoreCriteriaApi = (data) => {
  return request.post({ url: '/api/ScoreCriteria/DeleteScoreCriteria', data })
}
export const EditScoreCriteriaApi = (data) => {
  return request.post({ url: '/api/ScoreCriteria/EditScoreCriteria', data })
}
export const GetScoreCriteriaApi = (data) => {
  return request.post({ url: '/api/ScoreCriteria/GetScoreCriteria', data })
}
export const GetCourseScoreCriteriaApi = (params) => {
  return request.get({ url: '/api/ScoreCriteria/GetCourseScoreCriteria', params })
}
//考试信息
export const AddPlanExamApi = (data) => {
  return request.post({ url: '/api/planExam/AddPlanExam', data })
}
export const AddPlanExamsApi = (data) => {
  return request.post({ url: '/api/planExam/AddPlanExams', data })
}

export const UpdatePlanExamApi = (data) => {
  return request.post({ url: '/api/planExam/UpdateCourseExam', data })
}

export const GetStudentUsersApi = () => {
  return request.get({ url: '/api/User/GetStudentUsers' })
}

export const GetTeacherUsersApi = () => {
  return request.get({ url: '/api/User/GetTeacherUsers' })
}
export const AddCourseExamApi = (data) => {
  return request.post({ url: '/api/planExam/AddCourseExam', data })
}
export const GetCoursePlanExamScoreApi = (params) => {
  return request.get({ url: '/api/CoursePlan/GetCoursePlanExamScore', params })
}

export const PalyVideoApi = (params) => {
  //PalyPlanExamVideo  PalyVideo
  return request.get({ url: '/api/FileBrowse/PalyPlanExamVideo', params }) //, responseType: 'blob' , responseType: 'blob'
}

export const PalyIMGApi = (params) => {
  //PalyPlanExamVideo  PalyVideo
  return request.get({ url: '/api/FileBrowse/PalyPlanExamImage', params }) //, responseType: 'blob' , responseType: 'blob'
}
export const GetUserPlansApi = (data) => {
  return request.post({ url: '/api/CoursePlan/GetUserPlans', data })
}

export const GetTeacherPlansApi = (data) => {
  return request.post({ url: '/api/CoursePlan/GetTeacherPlans', data })
}

export const GetUserExamsApi = (data) => {
  return request.post({ url: '/api/PlanExam/GetUserExams', data })
}

export const GetTeacherExamsApi = (data) => {
  return request.post({ url: '/api/PlanExam/GetTeacherExams', data })
}

//课程考试情况表 按课程统计
export const GetCourseExamStatisticsApi = (data) => {
  return request.post({ url: '/api/PlanExam/GetCourseExamStatistics', data })
}
//课程培训情况表 按课程统计
export const GetCoursePlanStatisticsApi = (data) => {
  return request.post({ url: '/api/CoursePlan/GetCoursePlanStatistics', data })
}

export const GetCoursePlanDetailApi = (params) => {
  return request.get({ url: '/api/CoursePlan/GetCoursePlanDetail', params })
}
